<?php
/**
 * @abstract This class provides the abstract interface for some of the DB queries
 * 		- findPrimary() differs from find(): It will return only 1 row
 * 		- insertRaw() differs from insert(): It will pre-process, validate data
 * 		- saveRaw() differs from Table->update & Row->save(): It will pre-process data
 * 		- search() A comprehensive search function covering all the "SELECT" needs
 */
class Clu_Db_Table_Abstract extends Zend_Db_Table_Abstract
{ 

	/**
	 * @abstract Return a Row in stead of a RowSet like the Zend's find() function
	 * 		if not found, return NULL
	 */ 
	//public function findByPrimary($id)
	
	/**
	 * @param $data::Array(mixed) Data to be inserted. This array will have keys matching the table's fields
	 * 		and it might also contain additional (thus not used) keys
	 * @param $doValidate::Boolean Whether or not $data needs to be validated. Default = false
	 */ 
	
	//public function insertRaw($data, $doValidate = false)
	
	/**
	 * Return 
	 * 		true if successful
	 * 		false otherwise
	 * 
	 * @param $a::Table_Row the row to be updated. Can be NULL
	 * @param $id::Array(mixed) of primary key or KEYS of the row to be updated
	 * @param $data::Array(mixed) data to update into the row
	 * @param $doValidate::Boolean whether we need to validate data before saving
     */
	
	//abstract function saveRaw($a = null, $data, $id = null, $doValidate = false);

	/**
	 * 
	 * Return 
	 * 		true if successful
	 * 		false otherwise
	 */
	//public function deleteByPrimary($id)

	/**
	 * Add a prefix to Table Name;
	 */

	/*
    protected function _setupTableName()
    {
    	if (Zend_Registry::get('configuration')->db->tablePrefix)
			$this->_name =  Zend_Registry::get('configuration')->db->tablePrefix . '_' . $this->_name;
		parent::_setupTableName();
    }
	*/
    

	/**
	 * @param: $data: Search conditions
     */
	//public function search($data)
}    
?>